<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/tld/extremecomponents" prefix="ec" %>
<%@ include file="../common/common.jsp" %>
<%@ include file="user_pass2.jsp" %>
<%
IMessageService messageService = (IMessageService)BeanManager.getBean("messageService");
messageService.listDraftTable(LOGIN_ID,request);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=SYSTITLE%> - 工具箱</title>
<meta name="Keywords" content="<%=SYSMETAKEY%>" />
<meta name="Description" content="<%=SYSMETADESC%>" />
<%@ include file="../common/meta.inc" %>
<link rel="stylesheet" type="text/css" href="css/defaultStyle.css" >
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/extremetable/new/extremecomponents.css"/>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/common-validator.js"></script>
</head>
<body>
<%@ include file="../common/waiting.inc" %>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/prototype.js"></script>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/buffalo/buffalo.js"></script>
<SCRIPT language="javascript">

setStatus('<%=SYSTITLE%> - 工具箱');

var END_POINT="${pageContext.request.contextPath}/buffalo";
var buffalo = new Buffalo(END_POINT);

function deleteInfo(objs)
{
	if(sl_confirmRemove(objs))
	{
		var ids = getCheckBoxValues(objs);
		buffalo.remoteCall("messageServiceAjaxService.delete",[ids], function(reply) {
        	ajaxSubmit(reply.getResult(),"删除成功！","reload");		
    	});
	
	}	
}

function sendMessage(messageId) {
	
    var obj = {};
	obj[Buffalo.BOCLASS] = "java.util.HashMap";
	
	obj.messageId = messageId;	
	obj.opIp="<%=request.getRemoteAddr()%>";

    buffalo.remoteCall("messageServiceAjaxService.doSendMessage",[obj], function(reply) {
        ajaxSubmit(reply.getResult(),"发送成功！","reload");
    });
}

function editMessage(messageId)
{
	openPop("user_edit_message.jsp?messageId="+messageId,600,400,200,300);
}

</SCRIPT>
<script language="javascript" type="text/javascript" src="template/scripts/topBar.js"></script>
<%@ include file="includes/userMenu.inc" %>
<DIV class="line"></DIV>
<DIV class="list_table_0">
<%=HtmlConst.navMenu("user_take.jsp","我的工具箱")%>&gt;&gt;草稿箱
</DIV>
<DIV class="line"></DIV>
<form name="theform" method="post" action="user_draft.jsp">
	<ec:table form="theform"	    	    
		items="resultList"
		var="rs"	
		retrieveRowsCallback="limit"
        sortRowsCallback="limit"			
		action="${pageContext.request.contextPath}/club/user_draft.jsp"	
		>	
		<ec:row>				
				<ec:linkColumn property="TAKE_USER" title="收件人" width="18%" type="_blank" url="user_info.jsp?loginId=${rs.TAKE_USER }"/>								
				<ec:linkColumn property="TITLE" title="标题" styleClass="tdLeft" type="pop" url="user_edit_message.jsp?messageId=${rs.MESSAGE_ID }" windowWidth="600" windowHeight="400" windowTop="200" windowLeft="300"/>
				<ec:column property="OP_TIME" title="时间" cell="date"  width="20%"/>
				<ec:column property="2" title="发送" width="5%">
					<a href="javascript:sendMessage(${rs.MESSAGE_ID })"><img
							src="images/pages/15.gif" border="0"/>
					</a>
				</ec:column>
				<ec:column property="3" title="操作" width="5%"
					viewsAllowed="html">
					<input type="checkbox" name="messageId" value="${rs.MESSAGE_ID}">
				</ec:column>
		</ec:row>
	</ec:table>
</form>	
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tab">	
<tr class="tab3">
<td height="25" align="right">
	<input name="btnDelete" type="button" value="确定删除" class="btn" onclick="deleteInfo(document.theform.messageId);"/>全(反)选<input name="selectAll" type="checkbox" id="selectAll" onclick="selectAllBox(document.theform.messageId);"/>
</td>
</tr>
</table>	
<DIV class="line"></DIV>	
<%=COPYRIGHTFOOT%>
<%@ include file="../common/foot.inc"%>
</body>
</html>